package com.itheima.service;


import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.itheima.mapper.OmsOrderSettingMapper;
import com.itheima.pojo.OmsOrderSetting;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

@DubboService
public class OmsOrderSettingImpl implements OmsOrderSettingApi{

    @Autowired
    private OmsOrderSettingMapper omsOrderSettingMapper;


    @Override
    public void update(Integer id, OmsOrderSetting omsOrderSetting) {
        LambdaUpdateWrapper<OmsOrderSetting> wrapper = new LambdaUpdateWrapper<>();
        wrapper.eq(OmsOrderSetting::getId,id);
        omsOrderSettingMapper.update(omsOrderSetting,wrapper);
    }

    @Override
    public OmsOrderSetting getOrderSetting(Integer id) {
        OmsOrderSetting omsOrderSetting = omsOrderSettingMapper.selectById(id);
        return omsOrderSetting;
    }
}
